﻿<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="Default.aspx.cs" Inherits="AgileDashboard._Default"%>
<%@ OutputCache CacheProfile="GeneralCacheProfile" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Reference Control="~/controls/TeamIterationGraph.ascx" %>
<%@ Reference Control="~/controls/ReleaseGraph.ascx" %>
<%@ Reference Control="~/controls/BuildBox.ascx" %>
<%@ Register src="controls/DynamicControlLoader.ascx" tagname="DynamicControlLoader" tagprefix="uc2" %>

<asp:Content runat="server" ID="Head" ContentPlaceHolderID="HeadContentPlaceHolder">

    <script type="text/javascript">
    <!--
      $(document).ready(function() {
           
			//set initial opacity for highlighting sections
			if (<%=(KioskMode.ToString(CultureInfo.InvariantCulture).ToLower())%>)
			{
				$("div.panel").css("opacity","0.0");
				$("div.panel").css("position","absolute");
				
			    showPanel1IntervalID = setInterval(showPanel1, 0); //when to start the first div cycling
			    showPanel2IntervalID = setInterval(showPanel2, 6000); //when to start the second div cycling
			}
        });
	
		//SEQUENCING CODE FOR ANIMATED SECTION HIGHLIGHTING
		
		//specific timings for each panel
		var timeToShow = 5000;
		var timeToHide = 6750;
		
		var showPanel1IntervalID, 
		hidePanel1IntervalID, 
		showPanel2IntervalID, 
		hidePanel2IntervalID;
		

		function showPanel1()
		{

			$("div#panel1").stop().animate({opacity: 1.0}, "slow");
			clearInterval(showPanel1IntervalID);
			hidePanel1IntervalID = setInterval(hidePanel1, timeToShow);
		}
		
		function hidePanel1()
		{
			$("div#panel1").stop().animate({opacity: 0.0}, "slow");
			clearInterval(hidePanel1IntervalID);
			showPanel1IntervalID = setInterval(showPanel1, timeToHide);
		}

		
		function showPanel2()
		{

			$("div#panel2").stop().animate({opacity: 1.0}, "slow");
			clearInterval(showPanel2IntervalID);
			hidePanel2IntervalID = setInterval(hidePanel2, timeToShow);
		}
		
		function hidePanel2()
		{
			$("div#panel2").stop().animate({opacity: 0.0}, "slow");
			clearInterval(hidePanel2IntervalID);
			showPanel2IntervalID = setInterval(showPanel2, timeToHide);
		}
		

    //-->
    </script>
</asp:Content>
<asp:Content runat="server" ID="Body" ContentPlaceHolderID="BodyContentPlaceHolder">
			<div id="panel1" class="panel" style="z-index: 2000;">
				<div class="sectionTitle"><%=CurrentIteration.Name%> Progress</div>
				<div id="iterations">
					<div class="vertGraphwrap">
					    <asp:PlaceHolder ID="Teams" runat="server"></asp:PlaceHolder>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="panel2" class="panel" style="z-index: 1;">
				<div class="sectionTitle" class="section">Releases</div>
				<div id="projects">
					<div class="projrow">
						<div class="title" style="min-height: 10px;">Name</div>
						<div class="progress" style="min-height: 10px;">Progress <span class="subhead">[in Story Points]</span></div>
						<div class="clear"></div>
					</div>
                    <asp:PlaceHolder ID="Releases" runat="server"></asp:PlaceHolder>
				</div>
				<div class="sectionTitle" class="section">Builds</div>
				<div>
				    <asp:PlaceHolder ID="Builds" runat="server"></asp:PlaceHolder>
					<div class="clear"></div>
				</div>
			</div>		
</asp:Content>